Topics for the quiz:

Chapter 1
Chapter 2: 
Concatenation operator 
Variables + constants
Data types
Data conversion
Arithmetic expressions
Scanner

String is not included for the quiz

- OpenClaw?
Moltbook?

- Be active members of the community

- StringMethods.java

wissam:
0    first.length() - 1

"" + 'w' + 'm' ---> number  
1 + "" ---> "1"

substring ---> second parameter is exclusive
str.substring(idx1, idx2) // Go from idx1 (inclusive) to idx2 - 1 (inclusive)

- In Java, String is immutable
In Java, StringBuilder is the mutable equivalent of String

- In Java, we have an equality operator
==

3 == 3 // true
str1 == str2 // false

- Order the words: compareTo: int
< 0: I come before you
0: equal
> 0: I come after you

String str1 = "able";
String str2 = "bake";

System.out.println(str1.compareTo(str2)); // < 0

str2 = "Bake";
System.out.println(str1.compareTo(str2)); // > 0

- replace(oldChar, newChar)

String str = "Wissam";
String strModified = str.replace('s', 'S');
System.out.println("Modified string: " + strModified); // WiSSam

Example#1: StringMethods.java

- Random: java.util

nextInt(int upper) ----> {0, ..., upper - 1}

Example#2: RandomDemo.java

[lower; upper]

rnd.nextInt(a) + b ---> {0, ..., a - 1} + b ---> {b, ..., a + b - 1}

b = lower
a + b - 1 = upper ===> a = upper - b + 1












































